#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    QMenuBar* bar = this->menuBar();

    QMenu* menu1 = new QMenu("Documnet (&D)");
    menu1->setIcon(QIcon(":/photo"));
    QMenu* menu2 = new QMenu("Edit (&E)");
    QMenu* menu3 = new QMenu("Build(&B)");
    bar->addMenu(menu1);
    bar->addMenu(menu2);
    bar->addMenu(menu3);
    QAction* action1 = new QAction("action1");
    QAction* action2 = new QAction("action2");
    QAction* action3 = new QAction("action3");
    QAction* action4 = new QAction("action4");
    QAction* action5 = new QAction("action5");
    QAction* action6 = new QAction("action6");
    QAction* action7 = new QAction("action7");

    menu1->addAction(action1);
    menu1->addSeparator();
    menu1->addAction(action2);
    menu1->addSeparator();
    menu1->addAction(action3);
    menu1->addSeparator();
    menu1->addAction(action4);
    menu1->addSeparator();
    menu2->addAction(action5);
    menu2->addSeparator();
    menu2->addAction(action6);
    menu2->addSeparator();
    menu3->addAction(action7);


}

MainWindow::~MainWindow()
{
    delete ui;
}

